Alert FUNCTION Action Displays a window with one to three buttons that indicate choices for the user. Syntax variablename$ = Alert(style%, text$, row1%, col1%, row2%, col 2%, b1$, b2$, b3$) Remarks The Alert procedure returns an integer from 1 to 3, inclusive, indicating which button was selected by the user. Use Alert whenever you want to display a dialog box and force a user decision. The Alert procedure uses the following arguments. variablename$ ------------- Any BASIC variable name, including the name of a record variable or record element. style% ------ An integer that indicates the style of the text to be displayed. The values of style% are. 1 Truncated printing. If text is longer than the window, it is truncated. The text cursor is moved to the first character of the next line. 2 Character wrapping. If text is longer than the window, the text continues on the next line. 3 Text wrapping. Same as style 2 except that text is wrapped only at spaces. 4 Truncated centering. Text is centered on the current line. If text is too long, it is truncated. text$ ----- A string that contains the text to be displayed in the dialog box. You can force a new line in text$ by using the vertical bar character ( | ). Use several together for more than one blank line. row1%, col1% ------------ An integer pair that specifies absolute screen row and column coordinates. row2%, col 2% ------------- An integer pair that specifies the lower-right-corner coordinates of an area. b1$ --- A string that contains the text for button 1. b2$ --- A string that contains the text for button 2. b3$ --- A string that contains the text for button 3. If you use fewer than three buttons, use a null string ("") for the text of any unused buttons. All alert windows are modal; that is, they do not allow selection outside their boundaries. If you do not provide at least one button in your alert window, the Alert procedure will place a single OK button in the window for you. You must ensure that the window you have described is large enough to contain all three buttons on the bottom row, that the window is at least three rows high, and that the window is large enough to contain text$. If the window is too small or any other problem occurs, the Alert procedure returns 0. See Also. Dialog, ListBox Example See the DemoAlert procedure in the code example UIDEMO.BAS for a specific implementation.